const REQUEST = 'REQUEST'
const SUCCESS = 'SUCCESS'
const FAILURE = 'FAILURE'

export default function createRequestTypes(base:string) {
  type stringKey = Record<string, string>
  return [REQUEST, SUCCESS, FAILURE].reduce((acc:stringKey, type :string) => {
    acc[type] = `${base}_${type}`
    return acc
  }, {})
}
